// @FileName  :primes.c
// @Time      :2024/2/29 23:28
// @Author    :YKW
//# include <bits/stdc++.h>
//using namespace std;
#include <stdio.h>
#include <stdbool.h>

void prime_factorization(int num) {
    for (int i = 2; i * i <= num; ++i) {
        while (num % i == 0) {
            printf("%d ", i);
            num /= i;
            if (num == 1) break;
        }
    }
    if (num > 1) {
        printf("%d", num);
    }
}

void main() {
    int number;
    scanf("%d", &number);
    prime_factorization(number);
    return 0;
}
